Page({
    data:{
        list:[
            {name:'c',active:true,src:'images/c.png'},
            {name:'d',active:false,src:'images/d.png'},
            {name:'e',active:false,src:'images/e.png'},
            {name:'f',active:false,src:'images/f.png'},
            {name:'g',active:false,src:'images/g.png'},
            {name:'a',active:false,src:'images/a.png'},
            {name:'b',active:false,src:'images/b.png'},
        ],
        src:'images/c.png'
    },
    c(e){
        console.log(e)
        const id=e.currentTarget.dataset.id
        this.data.list.forEach(v=>{
            v.active = false
        })
        this.data.list[id].active = true
        this.setData({
            src:this.data.list[id].src,
            list:this.data.list
        })
        
    },
    
})